package com.together.sfipp.service.impl;

import com.together.sfipp.mapper.FamilyMapper;
import com.together.sfipp.pojo.Family;
import com.together.sfipp.service.FamilyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FamilyServiceImpl implements FamilyService {
    @Autowired
    private FamilyMapper familyMapper;

    @Override
    public void insert(Family family) {
        familyMapper.insert(family);
    }

    @Override
    public void delete(Integer familyId) {
        familyMapper.delete(familyId);
    }

    @Override
    public void update(Family family) {
        familyMapper.update(family);
    }

    @Override
    public List<Family> selectAll() {
        return familyMapper.selectAll();
    }

    @Override
    public List<Family> selectNeed(Map<String, Object> params) {
        return familyMapper.selectNeed(params);
    }

    @Override
    public Integer selectAmount(String familyRules) {
        return familyMapper.selectAmount(familyRules);
    }
}
